package com.wolf.service;

import com.wolf.pojo.Wl_commodity_inventory;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface Wl_commodity_inventoryService {
    int deleteByPrimaryKey(String id);

    int insert(Wl_commodity_inventory record);

    int insertSelective(Wl_commodity_inventory record);

    Wl_commodity_inventory selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(Wl_commodity_inventory record);

    int updateByPrimaryKey(Wl_commodity_inventory record);

    /**
     * 查询所有库存
     * @return
     */
    List<Wl_commodity_inventory> getAll();

    /**
     * 修改状态
     * @param id
     * @param status
     * @return
     */
    int updateByStatus(@Param("id") String id, @Param("status") int status);

    /**
     * 模糊查询
     * @param commodityname
     * @param property
     * @param status
     * @param startprice
     * @param endprice
     * @return
     */
    List<Wl_commodity_inventory> getBean(@Param("comm") String commodityname, @Param("prop") String property, @Param("status") Integer status, @Param("strat") Double startprice, @Param("end") Double endprice);

    /**
     * 查询库存数量不足100的商品
     * @return
     */
    List<Wl_commodity_inventory> getQuantity();

    /**
     * 根据产品Id查询出库存中的所有记录
     * @param commodityId
     * @return
     */
    List<Wl_commodity_inventory> getByCommodityId(String commodityId, String property);

}